home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Resources / Online / Miami / MiamiSDK / netinclude / ppcpragmas / miamibpf_pragmas.h < prev    next >
C/C++ Source or Header  |  1997-12-30  |  4KB  |  135 lines

  1. #ifndef _PPCPRAGMA_MIAMIBPF_H
  2. #define _PPCPRAGMA_MIAMIBPF_H
  3.  
  4. #ifndef POWERUP_PPCLIB_INTERFACE_H
  5. #include <powerup/ppclib/interface.h>
  6. #endif
  7.  
  8. #ifndef POWERUP_GCCLIB_PROTOS_H
  9. #include <powerup/gcclib/powerup_protos.h>
  10. #endif
  11.  
  12. #ifndef NO_PPCINLINE_STDARG
  13. #define NO_PPCINLINE_STDARG
  14. #endif/* SAS C PPC inlines */
  15.  
  16. #ifndef MIAMIBPF_BASE_NAME
  17. #define MIAMIBPF_BASE_NAME MiamiBPFBase
  18. #endif
  19.  
  20. #define MiamiBPFInit(m,b) _MiamiBPFInit(MIAMIBPF_BASE_NAME,m,b)
  21.  
  22. static __inline void
  23. _MiamiBPFInit(void *MiamiBPFBase,struct Library *m,struct Library *b) {
  24.     struct Caos MyCaos;
  25.     MyCaos.M68kCacheMode=IF_CACHEFLUSHALL;
  26.     MyCaos.PPCCacheMode=IF_CACHEFLUSHALL;
  27.     MyCaos.a0=(ULONG)m;
  28.     MyCaos.a1=(ULONG)b;
  29.     MyCaos.caos_Un.Offset=-30;
  30.     MyCaos.a6=(ULONG)MiamiBPFBase;
  31.     PPCCallOS(&MyCaos);
  32. }
  33.  
  34. #define MiamiBPFOpen(t) _MiamiBPFOpen(MIAMIBPF_BASE_NAME,t)
  35.  
  36. static __inline unsigned long
  37. _MiamiBPFOpen(void *MiamiBPFBase,struct TagItem *t) {
  38.     struct Caos MyCaos;
  39.     MyCaos.M68kCacheMode=IF_CACHEFLUSHALL;
  40.     MyCaos.PPCCacheMode=IF_CACHEFLUSHALL;
  41.     MyCaos.a0=(ULONG)t;
  42.     MyCaos.caos_Un.Offset=-36;
  43.     MyCaos.a6=(ULONG)MiamiBPFBase;
  44.     return (unsigned long)PPCCallOS(&MyCaos);
  45. }
  46.  
  47. #define MiamiBPFClose(i) _MiamiBPFClose(MIAMIBPF_BASE_NAME,i)
  48.  
  49. static __inline void
  50. _MiamiBPFClose(void *MiamiBPFBase,unsigned long i) {
  51.     struct Caos MyCaos;
  52.     MyCaos.M68kCacheMode=IF_CACHEFLUSHALL;
  53.     MyCaos.PPCCacheMode=IF_CACHEFLUSHALL;
  54.     MyCaos.d0=(ULONG)i;
  55.     MyCaos.caos_Un.Offset=-42;
  56.     MyCaos.a6=(ULONG)MiamiBPFBase;
  57.     PPCCallOS(&MyCaos);
  58. }
  59.  
  60. #define MiamiBPFRead(i,b,l) _MiamiBPFRead(MIAMIBPF_BASE_NAME,i,b,l)
  61.  
  62. static __inline long
  63. _MiamiBPFRead(void *MiamiBPFBase,unsigned long i,unsigned char *b,unsigned long l) {
  64.     struct Caos MyCaos;
  65.     MyCaos.M68kCacheMode=IF_CACHEFLUSHALL;
  66.     MyCaos.PPCCacheMode=IF_CACHEFLUSHALL;
  67.     MyCaos.d0=(ULONG)i;
  68.     MyCaos.a0=(ULONG)b;
  69.     MyCaos.d1=(ULONG)l;
  70.     MyCaos.caos_Un.Offset=-48;
  71.     MyCaos.a6=(ULONG)MiamiBPFBase;
  72.     return (long)PPCCallOS(&MyCaos);
  73. }
  74.  
  75. #define MiamiBPFSignalmask(i) _MiamiBPFSignalMask(MIAMIBPF_BASE_NAME,i)
  76.  
  77. static __inline unsigned long
  78. _MiamiBPFSignalMask(void *MiamiBPFBase,unsigned long i) {
  79.     struct Caos MyCaos;
  80.     MyCaos.M68kCacheMode=IF_CACHEFLUSHALL;
  81.     MyCaos.PPCCacheMode=IF_CACHEFLUSHALL;
  82.     MyCaos.d0=(ULONG)i;
  83.     MyCaos.caos_Un.Offset=-54;
  84.     MyCaos.a6=(ULONG)MiamiBPFBase;
  85.     return (unsigned long)PPCCallOS(&MyCaos);
  86. }
  87.  
  88. #define MiamiBPFIoctl(i,c,d) _MiamiBPFIoctl(MIAMIBPF_BASE_NAME,i,c,d)
  89.  
  90. static __inline long
  91. _MiamiBPFIoctl(void *MiamiBPFBase,unsigned long i,unsigned long c,unsigned char *d) {
  92.     struct Caos MyCaos;
  93.     MyCaos.M68kCacheMode=IF_CACHEFLUSHALL;
  94.     MyCaos.PPCCacheMode=IF_CACHEFLUSHALL;
  95.     MyCaos.d0=(ULONG)i;
  96.     MyCaos.d1=(ULONG)c;
  97.     MyCaos.a0=(ULONG)d;
  98.     MyCaos.caos_Un.Offset=-60;
  99.     MyCaos.a6=(ULONG)MiamiBPFBase;
  100.     return (long)PPCCallOS(&MyCaos);
  101. }
  102.  
  103. #define MiamiBPFSetAbortmask(i,m) _MiamiBPFSetAbortmask(MIAMIBPF_BASE_NAME,i,m)
  104.  
  105. static __inline void
  106. _MiamiBPFSetAbortmask(void *MiamiBPFBase,unsigned long i,unsigned long m) {
  107.     struct Caos MyCaos;
  108.     MyCaos.M68kCacheMode=IF_CACHEFLUSHALL;
  109.     MyCaos.PPCCacheMode=IF_CACHEFLUSHALL;
  110.     MyCaos.d0=(ULONG)i;
  111.     MyCaos.d1=(ULONG)m;
  112.     MyCaos.caos_Un.Offset=-66;
  113.     MyCaos.a6=(ULONG)MiamiBPFBase;
  114.     PPCCallOS(&MyCaos);
  115. }
  116.  
  117. #define MiamiBPFFilter(pc,p,l,pt) _MiamiBPFFilter(MIAMIBPF_BASE_NAME,pc,p,l,pt)
  118.  
  119. static __inline unsigned long
  120. _MiamiBPFFilter(void *MiamiBPFBase,void *pc,unsigned char *p,
  121.  unsigned long l,char pt) {
  122.     struct Caos MyCaos;
  123.     MyCaos.M68kCacheMode=IF_CACHEFLUSHALL;
  124.     MyCaos.PPCCacheMode=IF_CACHEFLUSHALL;
  125.     MyCaos.a0=(ULONG)pc;
  126.     MyCaos.a1=(ULONG)p;
  127.     MyCaos.d0=(ULONG)l;
  128.     MyCaos.d1=(ULONG)pt;
  129.     MyCaos.caos_Un.Offset=-72;
  130.     MyCaos.a6=(ULONG)MiamiBPFBase;
  131.     return (unsigned long)PPCCallOS(&MyCaos);
  132. }
  133.  
  134. #endif
  135.